// 1.下包并引入路由
import VueRouter from "vue-router";
import Vue from "vue";
import Home from "@/pages/Home";
import Login from "@/pages/Login";

// 2.应用路由插件(比如注册一些router提供的全局组件等等...)
Vue.use(VueRouter);

// 3.创建路由器对象,并在内部配置模式和路由表
const router = new VueRouter({
  mode: "history",
  routes: [
    { path: "/Home", component: Home,name:"Home" },
    { path: "/Login", component: Login ,name:"Login"},
  ],
});

// 4.暴露router,注入到vue实例中
export default router;
